package factory.fromKanYun.OrdinaryFactory;

import factory.fromKanYun.*;

/**
 * 产品工厂
 */
public class SendFactory {
    public Sender produceSender(String type) {
        if ("email".equals(type)) {
            return new EmailSender();
        } else if ("sms".equals(type)) {
            return new SmsSender();
        } else {
            System.out.println("没有这种类型...");
            return null;
        }

    }
}
